/**
 * Created by qingxi on 2017/1/13.
 */
define(['app','angular'],function(app,angular){
    app.factory('getData',['$http',function($http){
        var urlfix = 'http://192.168.127.222:9090/api/';
        return {
            rData:function( shopid,areaid,scope,url){
                $http({
                    method:'GET',
                    url: urlfix+url,
                    params:{
                        shopid:shopid,
                        areaid:areaid
                    },
                    cache:true
                }).then(function(data){
                    if(shopid==='') scope.shopData = data.data.result;
                    scope.listData = data.data.result;
                });
            }
        }
    }])
    app.factory('qx',[function(){
        return {
            qxClick:function(scope){
                angular.forEach(scope.navData, function(data,index,array){
                    data.status=false;
                });
            }
        }
    }])
})